package com.sinohealth.sca.config;

import com.sinohealth.sca.listener.PointMessageListener;
import com.sinohealth.sca.sender.PointMessageSender;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: 埋点配置类
 * @Package: com.sinohealth.sca.config
 * @Author: chenweifeng
 * @Date: 2024/04/07 上午11:36
 **/
@Configuration
@ConditionalOnClass(value = {PointMessageListener.class, PointMessageSender.class})
public class PointStarterAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public PointMessageListener messageListener() {
        return new PointMessageListener();
    }

    @Bean
    @ConditionalOnMissingBean
    public PointMessageSender messageSender() {
        return new PointMessageSender();
    }
}